/**
 * Created by hujj on 2017/6/26.
 */
export var sckr = {
  url: 'http://lggo.keywaysoft.com:8080/',
  api: 'http://lggo.keywaysoft.com:8080/api/'
}

export var realImg = function getImgSrc(htmlstr) {
/*  var arr = [], temp = [], reg = /<img.+?src=('|")?([^'"]+)('|")?(?:\s+|>)/gim
  while (temp = reg.exec(htmlstr)) {
    arr.push(sckr.api + temp[2]);
  }*/
  var content = htmlstr.replace(/<img [^>]*src=['"]([^'"]+)*/gi, function(match, contents, offset, s) {
     return match = ("<img src='" + sckr.url + contents + "'")
  });
  return content;
}
